#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :2.0.4 多线程传参.py
# @Time      :2020/7/13 17:34
# @Author    :亮亮
# @说明       :调用多线程时可以给函数传参
# @总结       :
import time
import threading


def name_1(num):
    for i in range(num):
        print("----{}----".format(i))
        time.sleep(1)


def name_2(num):
    for i in range(num, 200):
        print("----{}----".format(i))
        time.sleep(1)


def main():
    num = int(input("循环数字："))
    t_1 = threading.Thread(target=name_1, args=(num,))
    t_2 = threading.Thread(target=name_2, args=(num,))
    t_1.start()
    t_2.start()


if __name__ == '__main__':
    main()
